package Java攻略._3_流式操作._3_利用reduce方法实现归约操作;

import java.util.stream.Stream;

public class _22_利用reduce方法查找最大值 {

    public static void main(String[] args) {
        Integer max = Stream.of(1, 2, -13, 0, 5, 6, 7, 8, 9, 10)
                .reduce(Integer.MIN_VALUE, Integer::max);

        System.out.println(max);
    }
}
